public class text2 {
    public static void main(String[] args) {
        int count = 0;
        for(int i = 101;i <= 200;i++){
            boolean a = true;
            for(int j = 2;j < i;j++){
                if(i % j == 0){
                    a = false;
                    break;
                }
            }
            if(a){
                count++;
                System.out.println(i + "是质数");
            }else{
                System.out.println(i + "不是质数");
            }
        }
        System.out.println("一共有" + count + "个质数");
    }
}
